/*

 * Licensed to the Apache Software Foundation (ASF) under one

 * or more contributor license agreements.  See the NOTICE file

 * distributed with this work for additional information

 * regarding copyright ownership.  The ASF licenses this file

 * to you under the Apache License, Version 2.0 (the

 * "License"); you may not use this file except in compliance

 * with the License.  You may obtain a copy of the License at

 *

 *     http://www.apache.org/licenses/LICENSE-2.0

 *

 * Unless required by applicable law or agreed to in writing, software

 * distributed under the License is distributed on an "AS IS" BASIS,

 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

 * See the License for the specific language governing permissions and

 * limitations under the License.

 */

package com.bff.gaia.unified.sdk.transforms.xjoin.client.rdb.table;

/*

 * Licensed to the Apache Software Foundation (ASF) under one or more

 * contributor license agreements.  See the NOTICE file distributed with

 * this work for additional information regarding copyright ownership.

 * The ASF licenses this file to You under the Apache License, Version 2.0

 * (the "License"); you may not use this file except in compliance with

 * the License.  You may obtain a copy of the License at

 *

 *    http://www.apache.org/licenses/LICENSE-2.0

 *

 * Unless required by applicable law or agreed to in writing, software

 * distributed under the License is distributed on an "AS IS" BASIS,

 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

 * See the License for the specific language governing permissions and

 * limitations under the License.

 */



import com.bff.gaia.unified.sdk.transforms.xjoin.core.side.SideTableInfo;

import com.bff.gaia.unified.vendor.guava.com.google.common.base.Preconditions;



/**

 * Project Name: gaia-parent Description: Data: 2019/7/19 16:41

 *

 * @author tiger

 * @version v1.0

 */

public class RdbSideTableInfo extends SideTableInfo {



  private static final long serialVersionUID = -1L;



  public static final String URL_KEY = "url";



  public static final String TABLE_NAME_KEY = "tableName";



  public static final String USER_NAME_KEY = "userName";



  public static final String PASSWORD_KEY = "password";



  @Override

  public boolean check() {

    Preconditions.checkNotNull(url, "rdb of URL is required");

    Preconditions.checkNotNull(tableName, "rdb of tableName is required");

    Preconditions.checkNotNull(userName, "rdb of userName is required");

    Preconditions.checkNotNull(password, "rdb of password is required");

    Preconditions.checkNotNull(getSchema(), "rdb of password is required");

    return true;

  }



  private String url;



  private String tableName;



  private String userName;



  private String password;



  public String getUrl() {

    return url;

  }



  public void setUrl(String url) {

    this.url = url;

  }



  public String getTableName() {

    return tableName;

  }



  public void setTableName(String tableName) {

    this.tableName = tableName;

  }



  public String getUserName() {

    return userName;

  }



  public void setUserName(String userName) {

    this.userName = userName;

  }



  public String getPassword() {

    return password;

  }



  public void setPassword(String password) {

    this.password = password;

  }

}